home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 22 code / Paper Juggling / GXHeaders.c < prev    next >
Encoding:
Text File  |  1995-04-19  |  5.6 KB  |  232 lines  |  [TEXT/MMCC]

  1. // The following two typedef's are to work around a bug in the ETO #15
  2. // Universal headers -- the headers only typedef float_t and double_t
  3. // for "applec" and "powerc".  When this is eventually fixed, these
  4. // lines generate "redefined type" errors.
  5.  
  6. #ifndef powerc
  7.     typedef long double float_t;
  8.     typedef long double double_t;
  9. #endif
  10.  
  11. //
  12. // What follows is the entire MacHeaders.c file from CodeWarrior, followed by the GX stuff
  13. //
  14.  
  15. //--------------------------------------------------------------------------------------------
  16.  
  17. /*
  18.  *    MacHeaders.c
  19.  *
  20.  *    Script to generate the 'MacHeaders<xxx>' precompiled header for Metrowerks C/C++.
  21.  *  Copyright © 1993 metrowerks inc.  All rights reserved.
  22.  */
  23.  
  24. /*
  25.  *    Required for c-style toolbox glue function: c2pstr and p2cstr
  26.  *    the inverse operation (pointers_in_A0) is performed at the end ...
  27.  */
  28.  
  29. #ifndef powerc
  30.  #pragma pointers_in_D0                            
  31. #endif
  32.  
  33. /*
  34.  *    To allow the use of ToolBox calls which have now become obsolete on PowerPC, but
  35.  *    which are still needed for System 6 applications, we need to #define OBSOLETE.  If
  36.  *    your application will never use these calls then you can comment out this #define.
  37.  *    NB: This is only for 68K ...
  38.  */
  39.  
  40. #if !defined(powerc) && !defined(OBSOLETE)
  41.  #define OBSOLETE    1
  42. #endif
  43.  
  44. /*
  45.  *    Metrowerks-specific definitions
  46.  *
  47.  *    These definitions are commonly used but not in Apple's headers. We define
  48.  *    them in our precompiled header so we can use the Apple headers without modification.
  49.  */
  50.  
  51. #define PtoCstr        p2cstr
  52. #define CtoPstr        c2pstr
  53. #define PtoCString    p2cstr
  54. #define CtoPString    c2pstr
  55.  
  56. #define topLeft(r)    (((Point *) &(r))[0])
  57. #define botRight(r)    (((Point *) &(r))[1])
  58.  
  59. #define TRUE        true
  60. #define FALSE        false
  61.  
  62. #ifndef powerc
  63.  #include <MixedMode.h>
  64.  long GetCurrentA5(void)
  65.   ONEWORDINLINE(0x200D);
  66. #endif
  67.  
  68. /*
  69.  *    Apple #include files
  70.  *
  71.  *    Uncomment any additional #includes you want to add to MacHeaders.
  72.  */
  73.  
  74. /*    #include <ADSP.h>    */
  75.     #include <AEObjects.h>
  76.     #include <AEPackObject.h>
  77.     #include <AERegistry.h>
  78.     #include <AEUserTermTypes.h>
  79. //    #include <AIFF.h>
  80.     #include <Aliases.h>
  81.     #include <AppleEvents.h>
  82. //    #include <AppleGuide.h>
  83.     #include <AppleScript.h>
  84. //    #include <AppleTalk.h>
  85. //    #include <ASDebugging.h>
  86. //    #include <ASRegistry.h>
  87. //    #include <Balloons.h>
  88. //    #include <CMApplication.h>
  89. //    #include <CMComponent.h>
  90. //    #include <CodeFragments.h>
  91.     #include <ColorPicker.h>
  92. //    #include <CommResources.h>
  93. //    #include <Components.h>
  94.     #include <ConditionalMacros.h>
  95. //    #include <Connections.h>
  96. //    #include <ConnectionTools.h>
  97.     #include <Controls.h>
  98. //    #include <ControlStrip.h>
  99. //    #include <CRMSerialDevices.h>
  100. //    #include <CTBUtilities.h>
  101. //    #include <CursorCtl.h>
  102. //    #include <CursorDevices.h>
  103. //    #include <DatabaseAccess.h>
  104.     #include <Desk.h>
  105. //    #include <DeskBus.h>
  106.     #include <Devices.h>
  107.     #include <Dialogs.h>
  108. //    #include <Dictionary.h>
  109. //    #include <DisAsmLookup.h>
  110. //    #include <Disassembler.h>
  111.     #include <DiskInit.h>
  112. //    #include <Disks.h>
  113. //    #include <Displays.h>
  114. //    #include <Drag.h>
  115. //    #include <Editions.h>
  116. //    #include <ENET.h>
  117. //    #include <EPPC.h>
  118. //    #include <ErrMgr.h>
  119.     #include <Errors.h>
  120.     #include <Events.h>
  121. //    #include <fenv.h>
  122.     #include <Files.h>
  123. //    #include <FileTransfers.h>
  124. //    #include <FileTransferTools.h>
  125.     #include <FileTypesAndCreators.h>
  126. //    #include <Finder.h>
  127. //    #include <FixMath.h>
  128.     #include <Folders.h>
  129.     #include <Fonts.h>
  130. //    #include <fp.h>
  131. //    #include <FragLoad.h>
  132. //    #include <FSM.h>
  133.     #include <Gestalt.h>
  134.     #include <GestaltEqu.h>
  135. //    #include <HyperXCmd.h>
  136. //    #include <Icons.h>
  137. //    #include <ImageCodec.h>
  138. //    #include <ImageCompression.h>
  139. //    #include <IntlResources.h>
  140. //    #include <Language.h>
  141.     #include <Lists.h>
  142.     #include <LowMem.h>
  143. //    #include <MachineExceptions.h>
  144. //    #include <MacTCP.h>
  145. //    #include <MediaHandlers.h>
  146.     #include <Memory.h>
  147.     #include <Menus.h>
  148. //    #include <MIDI.h>
  149.     #include <MixedMode.h>
  150. //    #include <Movies.h>
  151. //    #include <MoviesFormat.h>
  152. //    #include <Notification.h>
  153. //    #include <OSA.h>
  154. //    #include <OSAComp.h>
  155. //    #include <OSAGeneric.h>
  156.     #include <OSEvents.h>
  157.     #include <OSUtils.h>
  158.     #include <Packages.h>
  159. //    #include <Palettes.h>
  160. //    #include <Picker.h>
  161. //    #include <PictUtil.h>
  162. //    #include <PictUtils.h>
  163.     #include <PLStringFuncs.h>
  164. //    #include <Power.h>
  165. //    #include <PPCToolbox.h>
  166.     #include <Printing.h>
  167.     #include <Processes.h>
  168. //    #include <QDOffscreen.h>
  169.     #include <Quickdraw.h>
  170. //    #include <QuickdrawText.h>
  171. //    #include <QuickTimeComponents.h>
  172.     #include <Resources.h>
  173. //    #include <Retrace.h>
  174. //    #include <ROMDefs.h>
  175. #ifndef powerc
  176. //    #include <SANE.h>
  177. #endif
  178.     #include <Scrap.h>
  179. //    #include <Script.h>
  180. //    #include <SCSI.h>
  181.     #include <SegLoad.h>
  182. //    #include <Serial.h>
  183. //    #include <ShutDown.h>
  184. //    #include <Slots.h>
  185. //    #include <Sound.h>
  186. //    #include <SoundComponents.h>
  187. //    #include <SoundInput.h>
  188. //    #include <Speech.h>
  189.     #include <StandardFile.h>
  190. //    #include <Start.h>
  191.     #include <Strings.h>
  192. //    #include <Terminals.h>
  193. //    #include <TerminalTools.h>
  194.     #include <TextEdit.h>
  195. //    #include <TextServices.h>
  196.     #include <TextUtils.h>
  197. //    #include <Threads.h>
  198. //    #include <Timer.h>
  199.     #include <ToolUtils.h>
  200. //    #include <Translation.h>
  201. //    #include <TranslationExtensions.h>
  202.     #include <Traps.h>
  203. //    #include <TSMTE.h>
  204.     #include <Types.h>
  205. //    #include <Unmangler.h>
  206. //    #include <Video.h>
  207.     #include <Windows.h>
  208. //    #include <WorldScript.h>
  209.  
  210.  
  211. // GX headers
  212. #include "graphics toolbox.h"
  213. #include "graphics routines.h"
  214. #include "graphics libraries.h"
  215. #include "graphics debugging.h"
  216. #include "graphics macintosh.h"
  217. #include "font library.h"
  218. #include "qd library.h"
  219. #include "PrintingMessages.h"
  220. #include "PrintingManager.h"
  221.  
  222.  
  223. /*
  224.  *    required for c-style toolbox glue function: c2pstr and p2cstr
  225.  *    (match the inverse operation at the start of the file ...
  226.  */
  227. #ifndef powerc
  228.  #pragma pointers_in_A0
  229. #endif
  230.  
  231.  
  232.